//index.js
//获取应用实例
const app = getApp()
Page({
  data: {

  },
  onLoad: function () {
    
  },
  onShareAppMessage: function () {
    return {
      title: '郑而炜的小程序',
      path: '/page/index/index'
    }
    // return custom share data when user share.
  },
  tapName: function (event) {
    console.log(event)
  },
  // 扫描
  scan:function(){
    // 允许从相机和相册扫码
    wx.scanCode({
      success: (res) => {
        alert(res);
      }
    })
  }
})